package com.project.erp.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

public class PrivilegeYesTag extends TagSupport{

	private static final long serialVersionUID = -3542084103390399789L;

	@Override
	public int doStartTag() throws JspException {
		
		Tag t = findAncestorWithClass(this, PrivilegeTag.class);   
        if(t!=null)
        {
        	PrivilegeTag parent = (PrivilegeTag) t;
            if(parent.isHasRight())
        	{
                return EVAL_BODY_INCLUDE;
            }
        }
        return SKIP_BODY;
	}
	
}
